<form class="layui-form" id="editform" style="padding: 17px 10px 0px 24px;" action="">
    <input class="hidden" name="permissionId" style="display: none" th:value="${permission.permissionId}">
    <div class="layui-inline custom-inline" >
        <div class="layui-input-block custom-radios">
            <input type="radio" name="type"  value="0" title="目录" lay-filter="radio" th:checked="${permission.type == 0}">
            <input type="radio" name="type"  value="1"   title="菜单" lay-filter="radio" th:checked="${permission.type == 1}">
            <input type="radio" name="type"  value="2"   title="按钮" lay-filter="radio" th:checked="${permission.type == 2}">
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">资源名称 :</label>
            <div class="layui-input-block">
                <input type="text" name="name" lay-verify="required" th:value="${permission.name}" placeholder="请输入"  class="layui-input">
            </div>
        </div>

        <div class="layui-form-item ">
            <label class="layui-form-label">上级资源 :</label>
            <div class="layui-input-block ">
                <input type="text" id="parentResource" lay-verify="required" th:value="${parentName}"  class="layui-input custom-disabled parentResource" readonly>
                <input type="hidden" name="parentId" id="parentId" th:value="${parentName == '顶级菜单'? '0':permission.parentId}"> <!--父亲隐藏域标签-->
            </div>
        </div>

        <div th:classappend="${permission.type != 0} ? 'myShowStyle' : 'myHideStyle'"  class="layui-form-item" id="formUrl">
            <label class="layui-form-label">资源url :</label>
            <div class="layui-input-block">
                <input type="text"  name="url" th:value="${permission.url}" lay-verify="required" placeholder="请输入"  class="layui-input">
            </div>
        </div>

        <div th:classappend="${permission.type != 0} ? 'myShowStyle' : 'myHideStyle'" class="layui-form-item" id="formPerms">
            <label class="layui-form-label">资源标识 :</label>
            <div class="layui-input-block">
                <input type="text" name="perms"  lay-verify="required" placeholder="请输入" th:value="${permission.perms}" class="layui-input">
            </div>
        </div>


        <div th:if="${permission.type} != 2" class="layui-form-item" id="formSort">
            <label class="layui-form-label">排序 :</label>
            <div class="layui-input-block">
                <input type="text" name="orderNum"  lay-verify="required" th:value="${permission.orderNum}" placeholder="请输入"  class="layui-input">
            </div>
        </div>

        <div th:if="${permission.type} == 2" class="layui-form-item" id="formSort">
            <label class="layui-form-label">排序 :</label>
            <div class="layui-input-block">
                <input type="text" name="orderNum"  lay-verify="required" th:value="${permission.orderNum}" placeholder="请输入"  class="layui-input">
            </div>
        </div>


        <div th:if="${permission.type} != 2"  class="layui-form-item" id="formIcon">
            <label class="layui-form-label">图标 :</label>
            <div class="layui-input-block">
                <input type="text"   name="icon"  lay-verify="required" placeholder="请输入" th:value="${permission.icon}"  class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">描述 :</label>
            <div class="layui-input-block">
                <input type="text" name="description"   lay-verify="required" placeholder="请输入"  th:value="${permission.description}" class="layui-input">
            </div>
        </div>

    </div>
</form>



